import random
secret = random.randint(1,2)

print ("猜一下我的年龄吧！")

temp = input("你打算猜几次呢：")
times = int(temp)
temp1 = 0
age = 0

while temp1 != times and age != secret:
    temp2 = input("请输入一下你的猜想吧：")
    age = int(temp2)

    if age == secret:
        print ("恭喜你猜对了！")
    else:
        if age > secret:
            print ("比你猜的小哦！")
            temp1 = temp1 + 1
        else:
            print ("比你猜的大哦！")
            temp1 = temp1 + 1
print ("\n结束了")
